<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>data demo</title>
<style>
div {
	color: blue;
}

span {
	color: red;
}
</style>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>


	<script>
		$.ajax({

			type: "POST",
			data: '{"idUser":1,"idPost":21}',
			url: "http://localhost:8080/tourismmer/resources/post/userGo",

			contentType : "application/json; charset=utf-8",
			success : function(data) {
				document.write(data.statusText);
			},
			error : function(data) {
				document.write("ocorreu um erro: " + data.statusText);
			}
		});
	</script>

</body>
</html>